/**************************************************************************
 * Copyright (C) 2011 Tyler Robertson
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 **************************************************************************/

#ifndef __PACKETS_H__
#define __PACKETS_H__

typedef enum _LEDSet
{
	eCoolWhite_LEDs,
	eRoyalBlue_LEDs_Front,
	eRoyalBlue_LEDs_Rear,
	eRed_LEDs,
	eGreen_LEDs,
	eBlue_LEDs,
	NumLEDSets,
} LEDSet;


/* An enum to determine what type of packet is being
 * sent.
 *
 * Each packet type
 * will have its own predefined format following
 * the packet_type byte.  All packet types will send
 * an end of packet at the end of thier packet. This
 * is used for synchronization in the microcontroller.
 */
typedef enum _packet_type
{
	PT_UNKNOWN                = 0,
	PT_COMMAND_PACKET         = 1,
	PT_STATE_PACKET           = 2,
	PT_TIMER_PACKET           = 3,
	PT_ASCII_PACKET           = 4,
	PT_STATISTICS_PACKET      = 5,
    PT_IDENTIFY_PACKET        = 6,
	
	// These should be last 
	PT_END_OF_PACKET          = 115,
} packet_type;



/* This struct just holds information
 * about the stream of text.
 *
 * The string at 'message' will be serialized
 * to the network stream.  No actual pointers
 * will be trnsmitted.
 */
typedef struct _ascii_packet_t
{
	unsigned long num_characters;
	char*         message;
} ascii_packet_t;


#endif /* #ifndef __PACKET_H__ */
